import Qt 4.7
import "../js/OAuth.js" as FutuAuth

Item {
    width: screenWidth
    height: screenHeight
    Image {
        id: splashImage
        x: 0
        y: 0
        source: "splash.png"
    }

    Rectangle {
        id: authorizeRect
        visible: !appItem.authenticated
        x: 240
        y: 240
        width:  200
        height: 60
        radius: 8
        color: authButtonMouseArea.containsMouse ? appItem.heiaOrange : appItem.heiaFocusColorInner
        border {
            width: 8
            color: appItem.heiaFocusColorOuter
        }
        Text {
            anchors.centerIn: parent
            font {
                family: appItem.applicationFont
                pixelSize: appItem.applicationFontSize
            }
            color: "black"
            text: qsTr("Authorize")
        }
        MouseArea {
            id: authButtonMouseArea
            anchors.fill: parent
            onClicked:  FutuAuth.startAuthentication();
        }
    }
}
